home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VGADOC4B.ZIP / VGADECL.INC < prev    next >
Text File  |  1995-09-05  |  11KB  |  336 lines

  1.  
  2.  {This file holds the public declarations for WHATVGA & utilities}
  3.  
  4. const
  5.   {Memory Mode definitions}
  6.   _text  =  1;
  7.   _txt2  =  2;
  8.   _txt4  =  3;
  9.   _herc  =  4;   {Hercules mono, 4 "banks" of 8kbytes}
  10.   _cga1  =  5;   {CGA 2 color, 2 "banks" of 16kbytes}
  11.   _cga2  =  6;   {CGA 4 color, 2 "banks" of 16kbytes}
  12.   _pl1   =  7;   {plain mono, 8 pixels per byte}
  13.   _pl1e  =  8;   {mono odd/even, 8 pixels per byte, two planes}
  14.   _pl2   =  9;   {4 color odd/even planes}
  15.   _pk2   = 10;   {4 color "packed" pixels 4 pixels per byte}
  16.   _pl4   = 11;   {std EGA/VGA 16 color: 4 planes, 8 pixels per byte}
  17.   _pk4   = 12;   {ATI mode 65h two 16 color pixels per byte}
  18.   _pk4a  = 13;   {As pk4, but reversed within byte}
  19.   _pk4b  = 14;   {As pk4a, but planes 1&2 are reversed}
  20.   _p8    = 15;   {one 256 color pixel per byte}
  21.   _p15   = 16;   {Sierra 15 bit}
  22.   _p16   = 17;   {Sierra 16bit/XGA}
  23.   _p24   = 18;   {RGB 3bytes per pixel}
  24.   _p24b  = 19;   {BGR 3bytes/pixel, but red first}
  25.   _p32   = 20;   {RGBa 3+1 bytes per pixel }
  26.   _p32b  = 21;   {BGRa 3+1 bytes per pixel }
  27.   _p32c  = 22;   {aRGR 3+1 bytes per pixel }
  28.   _p32d  = 23;   {aBGR 3+1 bytes per pixel }
  29.   max_mode  = _p32d;
  30.  
  31.  
  32.   {Primary chipset definitions}
  33.   __none     =  0;
  34.   __EGA      =  1;
  35.   __VGA      =  2;
  36.   __chips    =  3;
  37.   __WD       =  4;   {Paradise/Western digital}
  38.   __video7   =  5;
  39.   __Tseng    =  6;
  40.   __trid     =  7;
  41.   __poach    =  8;
  42.   __everex   =  9;
  43.   __ati      = 10;
  44.   __genoa    = 11;
  45.   __oak      = 12;
  46.   __cirrus   = 13;
  47.   __ahead    = 14;
  48.   __ncr      = 15;
  49.   __yamaha   = 16;
  50.   __s3       = 17;
  51.   __ALG      = 18;   {Avance Logic}
  52.   __mxic     = 19;
  53.   __vesa     = 20;
  54.   __realtek  = 21;
  55.   __p2000    = 22;
  56.   __cir54    = 23;
  57.   __cir64    = 24;
  58.   __Weitek   = 25;
  59.   __WeitekP9 = 26;   {Weitek Power9000}
  60.   __xga      = 27;
  61.   __compaq   = 28;
  62.   __AGX      = 29;
  63.   __Mach32   = 30;
  64.   __Mach64   = 31;
  65.   __UMC      = 32;
  66.   __HMC      = 33;
  67.   __Matrox   = 34;  {Matrox VGA}
  68.   __ARK      = 35;
  69.   __Acer     = 36;
  70.   __SC       = 37;
  71.   __xbe      = 38;
  72.   __MV       = 39;  {MediaVision Pro Graphics}
  73.   __MGA      = 40;  {Matrox (Native)}
  74.   __Alli     = 41;  {Alliance Pro Motion}
  75.   __IMAG     = 42;  {#9 Imagine 128}
  76.   __SiS      = 43;  {SiS Sg86c201}
  77.   max_chip   = __SiS;
  78.  
  79.   {DAC types}
  80.   _dac0        =   0;  {No DAC (MDA/CGA/EGA ..}
  81.   _dac8        =   1;  {Std VGA DAC 256 cols.}
  82.  
  83.   _dacInt      =   2;  {Internal Hi/True color DAC}
  84.   _dacCEG      =   3;  {Edsun CEG DAC}
  85.   _dac15       =   4;  {Sierra 32k DAC (SC11483)}
  86.   _dac16       =   5;  {Sierra 64k DAC}
  87.  
  88.   _dacADAC1    =  10;  {Acumos ADAC1  15/16/24 bit DAC}
  89.  
  90.   _dacALG1101  =  20;  {Avance Logic ALG1101 16bit DAC}
  91.   _dacALG1201  =  21;  {Avance Logic ALG1201 24 bit DAC}
  92.   _dacALG1301  =  22;  {Avance Logic ALG1301 24 bit DAC}
  93.  
  94.   _dacATI68860 =  30;  {ATI 68860 SpectraDAC}
  95.   _dacATI68880 =  31;
  96.  
  97.   _dacATT490   =  40;  {ATT 20c490  15/16/24 bit DAC}
  98.   _dacATT491   =  41;  {ATT 20c491  15/16/24 bit DAC}
  99.   _dacATT492   =  42;  {ATT 20c492  15/16/24 bit DAC}
  100.   _dacATT493   =  43;  {ATT 20c493  15/16/24 bit DAC}
  101.  
  102.   _dacATT504   =  50;  {ATT 20c504}
  103.   _dacATT505   =  51;  {ATT 20c505}
  104.  
  105.   _dacATT498   =  60;  {ATT 20c498  15/16/24 bit DAC}
  106.   _dacATT1498  =  61;  {ATT 21c498  15/16/24 bit DAC}
  107.   _dacATT2498  =  62;  {ATT 22c498  15/16/24 bit DAC}
  108.  
  109.   _dacBt477    =  70;  {Bt477}
  110.   _dacBt481    =  71;  {Bt481}
  111.   _dacBt482    =  72;  {Bt482}
  112.   _dacBt484    =  73;  {BrookTree Bt484/5 or ATT20c504/5 DAC}
  113.   _dacBt485    =  74;  {BrookTree Bt484/5 or ATT20c504/5 DAC}
  114.  
  115.   _dacCH8391   =  80;  {CHRONTEL CH8391}
  116.   _dacCH8398   =  81;  {CHRONTEL CH8398}
  117.  
  118.   _dacCL5200   =  90;  {Cirrus Logic CL-GD5200}
  119.  
  120.   _dacIBM514   = 100;
  121.   _dacIBM524   = 101;
  122.   _dacIBM525   = 102;  {IBM RGB525}
  123.   _dacIBM526   = 103;
  124.   _dacIBM528   = 104;
  125.   _dacIBM530   = 105;
  126.   _dacIBM561   = 106;
  127.   _dacIBM624   = 107;
  128.  
  129.   _dacICW498   = 120;
  130.   _dacICW516   = 121;
  131.  
  132.   _dacMU1880   = 130;  {MUSIC 9c1880/Diamond SS24 DAC}
  133.   _dacMU4870   = 131;
  134.   _dacMU4910   = 132;
  135.   _dacMU9910   = 133;
  136.  
  137.   _dacS3_716   = 140;
  138.   _dacS3_708   = 141;
  139.  
  140.   _dacSC486    = 150;  {Sierra SC11486 - 15bit DAC}
  141.   _dacSC15021  = 151;  {Sierra SC15021}
  142.   _dacSC15025  = 152;  {Sierra SC15025}
  143.  
  144.   _dacSTG1700  = 160;  {STG1700}
  145.   _dacSTG1702  = 161;  {STG1702}
  146.   _dacSTG1703  = 162;  {STG1703}
  147.  
  148.   _dacTLC34075 = 170;
  149.   _dacTLC34076 = 171;
  150.  
  151.   _dacTR8001   = 180;  {Trident TKD8001}
  152.  
  153.   _dacTVP3010  = 190;
  154.   _dacTVP3020  = 191;
  155.   _dacTVP3025  = 192;
  156.   _dacTVP3026  = 193;
  157.  
  158.   _dacUMC188   = 200;  {UMC UM70c188}
  159.  
  160.   _dacICS5301  = 210;  {ICS 5301}
  161.  
  162.  
  163.    {Clock definitions}
  164.   clk_unk        =  0;
  165.   clk_internal   =  1;   {Cirrus, Acumos}
  166.   clk_ext2       =  2;   {4 clks via 2 bits (Std VGA)}
  167.   clk_ext3       =  3;   {8 clks via 3 bits}
  168.   clk_ext4       =  4;   {16 clks via 4 bits}
  169.   clk_ext5       =  5;   {32 clks via 5 bits}
  170.   clk_ext6       =  6;   {64 clks via 3 bits}
  171.  
  172.   clk_sigma      =  7;   {Sigma Legend "buffered" 5 bit}
  173.   clk_ICD2061    =  8;
  174.   clk_ICD2061A   =  9;
  175.   clk_sdac       = 10;   {S3 SDAC or GenDAC}
  176.   clk_TVP302x    = 11;   {TI TVP 3020/3025}
  177.   clk_ICS2595    = 12;   {ICS 2595}
  178.   clk_SC11412    = 13;   {Sierra SC11412}
  179.   clk_CHRON      = 14;   {Chrontel CH8391/8}
  180.   clk_STG        = 15;   {STG1703}
  181.   clk_MUSIC      = 16;   {MUSIC MU9c9910}
  182.   clk_IBM52x     = 17;   {IBM RGB52x}
  183.  
  184.  
  185.   {Flags for special features}
  186.   ft_cursor = 1;   {Has hardware cursor}
  187.   ft_blit   = 2;   {Can do BitBLTs}
  188.   ft_line   = 4;   {Can do lines}
  189.   ft_rwbank = 8;   {Suports seperate R/W banks}
  190.  
  191.  
  192.     {Device Capabilities}
  193.   FLG_StdVGA  = 1;    {Set for VGA type devices}
  194.   FLG_ExtDAC  = 2;    {Set if we have RS2 or RS3 to the DAC}
  195.   FLG_PCIbus  = 4;    {Set if teh card is in a PCI slot}
  196.  
  197.    {DAC Flag bits, from DACflags}
  198.   DFL_cmdreg  =    1;  {The DAC has a Hidden Command Register}
  199.   DFL_8bit    =    2;  {The DAC can do 8bit (256 of 16M)}
  200.   DFL_clock   =    4;  {The DAC has onchip clock generator}
  201.   DFL_cursor  =    8;  {The DAC has a cursor}
  202.  
  203.  
  204.     {Flag options for ModeType}
  205.   MFL_enabled  =  1;   {Set if the mode is enabled}
  206.   MFL_graphics =  2;   {Set for graphics modes}
  207.   MFL_vgamode  =  4;   {Set for standard VGA modes}
  208.  
  209.   MFL_enGr     =  MFL_enabled or MFL_graphics;  {Enabled Graphics modes}
  210.   MFL_enVGA    =  MFL_enabled or MFL_vgamode;   {Enabled Standard VGA mode}
  211.   MFL_enGrVGA  =  MFL_enVGA or MFL_graphics;    {Enabled Graphics Std VGA mode}
  212.  
  213.  
  214.   header:array[0..max_chip] of string[14]=
  215.      ('','EGA','VGA','Chips&Tech','Paradise','Video7','Tseng','Trident'
  216.          ,'Poach','Everex','ATI','Genoa','Oak','Cirrus','Ahead','NCR'
  217.          ,'Yamaha','S3','ALG','MXIC','VESA','Realtek','PRIMUS','Cirrus54'
  218.          ,'Cirrus64','Weitek','WeitekP9','XGA','COMPAQ','AGX','Mach32'
  219.          ,'Mach64','UMC','HMC','Matrox','ARK','Acer','Sierra','XBE'
  220.          ,'MediaVision','MGA','Alliance','Imagine','SiS');
  221.  
  222.  
  223.       {Short name for chip families}
  224.   chipnam:array[0..max_chip] of string[8]=
  225.         ('','EGA','VGA','CT45x','WD','Video7','Tseng','Trident'
  226.         ,'Poach','Everex','ATI','Genoa','OAK','Cirrus','Ahead','NCR'
  227.         ,'Yamaha','S3','ALG','MXIC','VESA','Realtek','Primus','CL54xx'
  228.         ,'CL64xx','Weitek','P9000','XGA','Compaq','AGX','Mach32'
  229.         ,'Mach64','UMC','HMC','Matrox','ARK','ACER','SIERRA','XBE'
  230.         ,'MVision','MGA','Alliance','Imagine','SiS');
  231.  
  232.  
  233.  
  234.  
  235.  
  236.   {AutoTest flags & structures}
  237.  
  238.     {AF test record IDs}
  239.   AF_header   = 0;
  240.   AF_videosys = 1;
  241.   AF_modeinfo = 2;
  242.   AF_tcursor  = 3;    {Cursor test record ID}
  243.   AF_tbitblt  = 4;    {BitBLT test record ID}
  244.   AF_tline    = 5;    {LineDrv test record ID}
  245.   AF_trwbank  = 6;    {RWbank test record ID}
  246.   AF_tzoom    = 7;    {Zoom test record ID}
  247.   AF_BIOSdmp  = 255;
  248.  
  249.     {AF Flag values}
  250.   AFF_testok   =  1;   {Set if the test was succesful}
  251.   AFF_dispok   =  2;   {Set if the mode was displayed ok}
  252.   AFF_scroll   =  4;   {Set if the mode can be scrolled}
  253.   AFF_scrollok =  8;   {Set if the scroll test was ok}
  254.   AFF_canceled = 16;   {Set if the mode was canceled}
  255.  
  256.  
  257. type
  258.   vidinfo=record
  259.             chip:byte;
  260.             flags:word;          {Flags (FLG_}
  261.             id:word;             {instance}
  262.             IOadr:word;          {I/O adr}
  263.             spcreg:word;    {Special register offset (IIT)}
  264.             Xseg:word;
  265.             Phadr:longint;
  266.             version:word;        {version}
  267.             subvers:word;        {Subversion}
  268.             dactype:word;            {The dac type}
  269.             dacname:string[20];  {The Name of the DACtype}
  270.             mm:word;             {#kilobytes of video memory}
  271.             features:word;       {Flags for special features}
  272.             sname:string[8];     {Short chip family name}
  273.             name:string[40];     {Full chip name}
  274.             clktype:word;        {Clock type (clk_)}
  275.             clks:array[0..63] of longint;  {Clocks in Hz}
  276.             PCIid:byte;
  277.           end;
  278.  
  279.   _AT0=record
  280.          SWvers:word;  {SW version}
  281.          vid_sys,         {Number of video systems}
  282.          cur_vid:word;    {Currently selected video system (1..)}
  283.          curtime:longint; {Date & time of the test}
  284.        end;
  285.        {This record followed by: (Email),(Name&Address),(Video desc)
  286.                     ,(System),(modenames),(clock names)}
  287.  
  288.  
  289.     {AT1 is the VIDINFO record, one per Video Subsystem}
  290.  
  291.   _AT2=record
  292.          mode:word;
  293.         Mmode:byte;   {Memory Model}
  294.        pixels,
  295.          lins,
  296.         bytes,
  297.          crtc,
  298.          vseg:word;
  299.       Cpixels,
  300.         Clins,
  301.        Cbytes,
  302.         Cvseg:word;
  303.        CMmode:byte;   {Calculated mode}
  304.       ChWidth,
  305.      ChHeight,
  306.       ExtPixf,
  307.       ExtLinf:byte;
  308.          Vclk,
  309.          Hclk,
  310.          Fclk:longint;    {Freqs in Hz (Fclk is in mHz)}
  311.         iLace:boolean;
  312.          Flag:byte;       {Test results (AFF_)}
  313.        end;
  314.        {This record followed by: (Comment), (reg values)}
  315.  
  316.   _AT3=record  {Used for }
  317.          mode:word;
  318.         Mmode:byte;
  319.          Flag:byte;       {Test results (AFF_)}
  320.        end;
  321.        {This record followed by: (Comment)}
  322.  
  323.   _ATff=record
  324.           int10,
  325.           int6D,
  326.           m4a8,   {0:4A8h}
  327.           fnt8h,
  328.           fnt8l,
  329.           fnt14,
  330.           fnt14x9,
  331.           fnt16,
  332.           fnt16x9:word;
  333.           Base:word;
  334.           size:byte;
  335.         end;
  336.